package com.zmzncs.lmtc.common.pojo.enums.optionalvalue.reserve;


/**
 * 规则的开启关闭
 */
public enum ReserveStatusEnum {

    APPLYING(1, "申请中"),
    PASS(2, "预约通过"),
    REFUSE(3, "预约驳回"),
    REFUNDAPPLY(4, "申请退款"),
    REFUNDSUCCESS(5, "退款完成"),
    SUCCESS(6, "正常结束"),
    FALSE(7, "未正常结束"),
    ;

    private int code;

    private String massage;

    ReserveStatusEnum(int code, String massage){
        this.code = code;
        this.massage = massage;
    }

    // 普通方法
    public static String getMessage(int code) {
        for (ReserveStatusEnum statusEnum : ReserveStatusEnum.values()) {
            if (statusEnum.getCode() == code) {
                return statusEnum.getMassage();
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMassage() {
        return massage;
    }

    public void setMassage(String massage) {
        this.massage = massage;
    }
}
